Integrand size = 37, antiderivative size = 421 \[ \int \frac {A+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}} \, dx=\frac {2 \left (A b^2+a^2 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{a^2 b \sqrt {a+b} d}+\frac {2 (A b-a C) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{a b \sqrt {a+b} d}-\frac {2 \sqrt {a+b} C \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{b^2 d}-\frac {2 \left (A b^2+a^2 C\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \]
[Out]
Time = 0.96 (sec) , antiderivative size = 421, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.162, Rules used = {3131, 2888, 3072, 3077, 2895, 3073} \[ \int \frac {A+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}} \, dx=\frac {2 \left (a^2 C+A b^2\right ) \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{a^2 b d \sqrt {a+b}}-\frac {2 \left (a^2 C+A b^2\right ) \sin (c+d x)}{b d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}+\frac {2 (A b-a C) \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right )}{a b d \sqrt {a+b}}-\frac {2 C \sqrt {a+b} \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right )}{b^2 d} \]
[In]
[Out]
Rule 2888
Rule 2895
Rule 3072
Rule 3073
Rule 3077
Rule 3131
Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {A b-a C \cos (c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}} \, dx}{b}+\frac {C \int \frac {\sqrt {\cos (c+d x)}}{\sqrt {a+b \cos (c+d x)}} \, dx}{b} \\ & = -\frac {2 \sqrt {a+b} C \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{b^2 d}-\frac {2 \left (A b^2+a^2 C\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}+\frac {\int \frac {A b^2+a^2 C+(a A b+a b C) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{b \left (a^2-b^2\right )} \\ & = -\frac {2 \sqrt {a+b} C \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{b^2 d}-\frac {2 \left (A b^2+a^2 C\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}+\frac {(A b-a C) \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx}{b (a+b)}+\frac {\left (A b^2+a^2 C\right ) \int \frac {1+\cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{b \left (a^2-b^2\right )} \\ & = \frac {2 \left (A b^2+a^2 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{a^2 b \sqrt {a+b} d}+\frac {2 (A b-a C) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{a b \sqrt {a+b} d}-\frac {2 \sqrt {a+b} C \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{b^2 d}-\frac {2 \left (A b^2+a^2 C\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 6.97 (sec) , antiderivative size = 1225, normalized size of antiderivative = 2.91 \[ \int \frac {A+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}} \, dx=\frac {2 \sqrt {\cos (c+d x)} \left (A b^2 \sin (c+d x)+a^2 C \sin (c+d x)\right )}{a \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {-\frac {4 a \left (a^2 A-A b^2\right ) \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-4 a (-a A b-a b C) \left (\frac {\sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-\frac {\sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{b \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}\right )+2 \left (-A b^2-a^2 C\right ) \left (\frac {i \cos \left (\frac {1}{2} (c+d x)\right ) \sqrt {a+b \cos (c+d x)} E\left (i \text {arcsinh}\left (\frac {\sin \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\cos (c+d x)}}\right )|-\frac {2 a}{-a-b}\right ) \sec (c+d x)}{b \sqrt {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)} \sqrt {\frac {(a+b \cos (c+d x)) \sec (c+d x)}{a+b}}}+\frac {2 a \left (\frac {a \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-\frac {a \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{b \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}\right )}{b}+\frac {\sqrt {a+b \cos (c+d x)} \sin (c+d x)}{b \sqrt {\cos (c+d x)}}\right )}{a (a-b) (a+b) d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(1785\) vs. \(2(393)=786\).
Time = 22.45 (sec) , antiderivative size = 1786, normalized size of antiderivative = 4.24
method | result | size |
default | \(\text {Expression too large to display}\) | \(1786\) |
parts | \(\text {Expression too large to display}\) | \(1815\) |
[In]
[Out]
\[ \int \frac {A+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {C \cos \left (d x + c\right )^{2} + A}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}} \sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}} \, dx=\int \frac {A + C \cos ^{2}{\left (c + d x \right )}}{\left (a + b \cos {\left (c + d x \right )}\right )^{\frac {3}{2}} \sqrt {\cos {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {A+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {C \cos \left (d x + c\right )^{2} + A}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}} \sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {C \cos \left (d x + c\right )^{2} + A}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}} \sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}} \, dx=\int \frac {C\,{\cos \left (c+d\,x\right )}^2+A}{\sqrt {\cos \left (c+d\,x\right )}\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \]
[In]
[Out]